<%@ page language="java" pageEncoding="UTF-8" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>消息推送平台 msgweb</title>
    <script type="text/javascript" src="resources/scripts/jquery.min.js"></script>
    <script type="text/javascript" src="resources/scripts/yto_msg_v2.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            var domain = "http://10.129.221.158:8084/msg-web";
            domain = "http://localhost:8080/msg-web";
            YtoMsg.addMsg(domain, "80d2358c-da74-4e51-8b5f-a55f8c49ce68", "MSG_USER_df757bf3-fef5-413f-a2be-260128cdfb0a", true);
        });

        //获取返回的值
        YtoMsg.setCallback(function (msg) {
            //弹出内容
            YtoMsg.pop("我的系统111");
//            alert(JSON.stringify(msg));
//            if (msg != null && msg.resultFlag == true) {
//                var datas = msg.datas;
//                var msgIds = new Array();
//                for (var i = 0; i < datas.length; i++) {
//                    msgIds.push(datas[i].yto_msg_msgId);
//                }
//                YtoMsg.modifyState(msgIds);
//            }
        });
    </script>
</head>
<body>
<h2>Hello World!</h2>
</body>
</html>